package ipcards.rulesets;

import ipcards.CardSet;
import ipcards.Controller;
import ipcards.Deck;
import ipcards.Game;
import ipcards.Room;
import ipcards.Table;

public class ChaseTheAceGame extends Game {
	
	private ChaseTheAceRuleSet ruleset;
	private String CTADeckName;
	private Controller systemtoplevel;
	private CardSet CTADeck;
	//private CardServer server1;
	
	public ChaseTheAceGame(Table table1) {
		Room thisroom = table1.getRoom();
		systemtoplevel = thisroom.getModel();
		//server1 = systemtoplevel.getCardServer();
		ruleset = new ChaseTheAceRuleSet();
		CTADeckName = ruleset.getDeckName();						//method needed in ChaseTheAceRuleSet
		
		systemtoplevel.getRoom().getTable().addDeck(new Deck(CTADeckName));
	
		CTADeck = systemtoplevel.getRoom().getTable().getCards();
		CTADeck.shuffle();
		
		//CardsServer s = systemtoplevel.getCardServer();
		//if(s == null){System.out.println("server is null");}
		int numplayers = systemtoplevel.numPlayers();
		System.out.println(numplayers);
	}
	
	
}